<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>animation-direction</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
      width: 100vw;
      height: 100vh;
      background: #34495e;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    div {
      width: 100px;
      height: 100px;
      background: radial-gradient(at center, #e67e22, #e74c3c);
      border-radius: 50%;
      animation-name: ball;
      animation-duration: 1s;
      animation-iteration-count: infinite;
      animation-direction: alternate-reverse;
    }
    section {
      width: 300px;
      height: 40px;
      background: rgba(0,0,0,.3);
      position: absolute;
      transform: translateY(50px);
      z-index: -1;
      border-radius: 50%;
      filter: blur(5px);
      animation-name: ballShadow;
      animation-duration: 1s;
      animation-iteration-count: infinite;
      animation-direction: alternate-reverse;
    }
    @keyframes ballShadow {
      to {
        width: 260px;
        height: 20px;
        filter: blur(8px);
        background: rgba(0,0,0,.4);
      }
    }
    @keyframes ball {
      to {
        transform: translateY(-200px);
      }
    }
  </style>
</head>
<body>
  <div></div>
  <section></section>
</body>
</html>